import React, { memo } from "react";
import { UserWrap } from "./style";
import UserTop from "./u-pages/userTop";
import { renderRoutes } from "react-router-config";

export default memo(function User(props) {
  const { route } = props;

  const userId = props.location.search.split("=")[1];

  return (
    <UserWrap>
      <UserTop id={userId} />
      {renderRoutes(route.routes)}
    </UserWrap>
  );
});
